<template>
  <div class="login-wrap">
    <van-tabs v-model="active">
      <van-tab title="登录"><LoginForm /></van-tab>
      <van-tab title="注册"
        ><RegisterForm @changeActive="changeActive"
      /></van-tab>
    </van-tabs>
  </div>
</template>

<script>
import LoginForm from "../components/LoginForm.vue";
import RegisterForm from "../components/RegisterForm.vue";
export default {
  name: "LoginView",
  data() {
    return {
      active: 0,
    };
  },
  components: {
    LoginForm,
    RegisterForm,
  },
  methods: {
    changeActive(n) {
      this.active = n;
    },
  },
};
</script>